package marmalius.object.portail;

import marmalius.Player;

public class PortailService {
	private static final PortailService instance = new PortailService();
	
	public boolean isLadder(int ladderID) {
		return isUpLadder(ladderID) || isDownLadder(ladderID);
	}
	
	public boolean isUpLadder(int ladderID) {
		switch (ladderID) {
			case 1738:
			case 1739:
				return true;
		}
		return false;
	}
	
	public boolean isDownLadder(int ladderID) {
		switch (ladderID) {
			case 1740:
				return true;
		}
		return false;
	}
	
	public void climbUP(Player player) {
		player.startAnimation(828);
		player.setTeleport(player.getAbsX(), player.getAbsY(), player.getAbsH() + 1);
		player.sendPlayerMessage("You climb up the ladder");
	}
	
	public void climbDown(Player player) {
		player.startAnimation(828);
		player.setTeleport(player.getAbsX(), player.getAbsY(), player.getAbsH() - 1);
		player.sendPlayerMessage("You climb up the ladder");
	}
	
	public static PortailService getInstance() { return instance; }
}
